﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile" CodeBehind="TranslatedNewMatchSentences.aspx.cs" Inherits="Nivdal.TranslatedNewMatchSentences" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="TranslatedSentencesTitleLabel" runat="server" CssClass="white_title" Text="All translated sentences"></asp:Label>
    </div>
    <div class="padding5">

    
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
    <ProgressTemplate>
        <div class="ajaxloader">
            <asp:Image ID="UpdatPriogressImage1" ImageUrl="~/Images/ajax-loader.gif" runat="server"/>
        </div>
    </ProgressTemplate>
    </asp:UpdateProgress>
    
    <asp:GridView ID="SentencesGridview" runat="server" DataSourceID="SentencesPartsDataSource" AllowPaging="true" AutoGenerateColumns="false"
     SkinID="FrumGrid" PageSize="50">
        <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="TopAndBottom" />
        <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
         <Columns>
            <asp:TemplateField HeaderText="#">
                <ItemTemplate>
                    <asp:Label ID="NumLabel" runat="server" Text='<%# Eval("SentenceId") + "." + Eval("PartNumber") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="NumLabel" runat="server" Text='<%# Eval("SentenceId") + "." + Eval("PartNumber") %>' SkinID="GridLabel"></asp:Label>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="English sentence">
                <ItemTemplate>
                    <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("EnglishText") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Translation">
                <ItemTemplate>
                    <asp:Label ID="TranslationText" runat="server" Text='<%# Eval("Text") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <CustomControls:TextArea ID="TranslationTextBox" runat="server" Text='<%# Bind("Text") %>'
                     TextMode="MultiLine" MaxLength="256" Width="300" Height="80" ></CustomControls:TextArea>
                    <asp:HiddenField ID="PartIdHiddenField" runat="server" Value='<%# Bind("PartId") %>' />
                    <asp:DropDownList ID="SeparatorsDDL" runat="server" DataSourceID="SeparatorsDataSource" 
                    DataTextField="PartDescription" DataValueField="Id" SelectedValue='<%# Bind("SeparatorId") %>'></asp:DropDownList>
                    <asp:SqlDataSource ID="SeparatorsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="Nivdal_GetAllNewMatchSentencesSeparators" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton ID="EditLinkButton" runat="server" Text="<%$ Resources:Resource, Global_Edit %>" SkinID="GreenTitleLink"
                 CommandName="Edit"></asp:LinkButton>
            </ItemTemplate>
            <EditItemTemplate>
                <asp:LinkButton ID="UpdateLinkButton" runat="server"  Text="<%$ Resources:Resource, Global_Update %>" 
                SkinID="GreenTitleLink" CommandName="Update"></asp:LinkButton>
                <asp:LinkButton ID="CancelLinkButton" runat="server"  Text="<%$ Resources:Resource, Global_Cancel %>" 
                SkinID="GreenTitleLink" CommandName="Cancel"></asp:LinkButton>
            </EditItemTemplate>
            </asp:TemplateField>
         </Columns>
     
    </asp:GridView>
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="IgnoredSentencesTitleLabel" runat="server" Text="Skipped sentences" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
    
    <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="ajaxloader">
                <asp:Image ID="UpdatPriogressImage2" ImageUrl="~/Images/ajax-loader.gif" runat="server"/>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    
    <asp:GridView ID="IgnoredSentencesGridview" runat="server" DataSourceID="IgnoreDataSourse" AllowPaging="true" AutoGenerateColumns="false"
     SkinID="FrumGrid" PageSize="50" OnRowCommand="UnignoreSentence">
    <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
        Mode="NumericFirstLast" PageButtonCount="10" Position="TopAndBottom" />
    <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
    <Columns>
        <asp:TemplateField HeaderText="Sentence description">
            <ItemTemplate>
                <asp:Label ID="SentenceDescriptionLabel" runat="server" Text='<%# Eval("Description") %>' SkinID="GridLabel"></asp:Label>

            </ItemTemplate>        
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:ImageButton ID="DeleteButton" runat="server" ImageUrl="~/Images/Icons/delete.png" ToolTip="Unskip this sentence"
                 CommandName="Unignore" CommandArgument='<%# Eval("IgnoreId") %>' />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <EmptyDataTemplate>
        <asp:Label ID="EmptyDataLabel" runat="server" Text="No ignores sentences" SkinID="GridLabel"></asp:Label>
    </EmptyDataTemplate>
    </asp:GridView>
    <br /><br />
    <asp:HyperLink ID="TranslateNewMatchSentencesHyperlink" runat="server" NavigateUrl="~/TranslateNewMatchSentences.aspx"
     Text="Back to new match sentences translation" SkinID="GreenTitleHyperLink"></asp:HyperLink>
   
    </div>
    </div>
    </ContentTemplate>
    </asp:UpdatePanel>        
      <asp:SqlDataSource ID="SentencesPartsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetAllTranslatedNewMatchSentences" SelectCommandType="StoredProcedure"
        UpdateCommand="Nivdal_UpdateNewMatchSentencePart" UpdateCommandType="StoredProcedure"></asp:SqlDataSource>
     <asp:SqlDataSource ID="IgnoreDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetAllIgnoredNewMatchSentences" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="Translate >> translate match sentences >> all translated sentences" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
